<!doctype html>
<html>

	<head>
		<meta charset="UTF-8">
		<title></title>
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<link href="../css/mui.min.css" rel="stylesheet" />
		<link rel="stylesheet" href="../css/style.css" />
		<link rel="stylesheet" href="../css/iconfont.css " />
		<link rel="stylesheet" href="../css/swiper.css" />
		<link href="../css/calendar/calendar.css" rel="stylesheet"/>
		<style>
			.swiper-wrapper img{height: 150px!important;}
		</style>
		 <script type="text/javascript" src="../js/swiper.min.js" ></script>
	</head>
	<body>
		<header class="mui-bar mui-bar-nav ding-bar">
		    <a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
		    <h1 class="mui-title">电梯管理</h1>
		</header>
		<div class="mui-content">
			<div class="banner" style=" width: 95%;margin:5px auto;border-radius:5px ;">
				<div class="swiper-wrapper" id="banner">
	                 <!--<div class='swiper-slide'><img src='../images/banner.png'></div>
	                 <div class='swiper-slide'><img src='../images/banner.png'></div>
	                 <div class='swiper-slide'><img src='../images/banner.png'></div>-->
				</div>
				<div class="swiper-pagination"></div>
			</div> 
			
		    <div id="tabbar" class="mui-control-content mui-active">
		    	<div class="gl-icon">
		    		<h1 class="gl-icon-t"><span></span><div>我的工作</div></h1>
		    		<ul class="gl-icon-list">
		    			<li><a data-href="xunchalist.html">
		    				<img  src="../images/dtgl-icon1.png"/>
		    				<span>巡查扫码</span>
		    			</a></li>
		    			<li>
		    				<a data-href="weipai_list.html">
			    				<img  src="../images/dtgl-icon2.png"/>
			    				<span>委派工单</span>
		    			    </a>
		    			</li>
		    			<li><a data-href="daiqueren.html?dai=dai">
		    				<img  src="../images/dtgl-icon2-07.png"/>
		    				<span>待确认</span>
		    			</a></li>
		    			<li>
		    				<a data-href="daiqueren.html?dai=wei">
			    				<img  src="../images/yiqueren.png"/>
			    				<span>已确认</span>
			    			</a>
		    			</li>
		    		</ul>
		    	</div>
		    	<div class="gl-icon">
		    		<h1 class="gl-icon-t"><span></span><div>小工具</div></h1>
		    		<ul class="gl-icon-list">
		    			<li><a data-href="daka.html">
		    				<img  src="../images/dtgl-icon5.png"/>
		    				<span>考勤打卡</span>
		    			</a data-href="gonggao.html"></li>
		    			<li><a data-href="gonggao.html">
		    				<img  src="../images/dtgl-icon6.png"/>
		    				<span>公司公告</span>
		    			</a></li>
		    			
		    		</ul>
		    	</div>
		    </div>
		    <footer>
				<nav class="mui-bar mui-bar-tab guanli-footer">
					<a class="mui-tab-item mui-active" id="gongzuo">
						<span class="mui-icon  iconfont icon-gongzuoshi-active"></span>
						<span class="mui-tab-label ">工作</span>
					</a>
					<a class="mui-tab-item " data-href="tongzhi.html" id="tongzhi">
						<span class="mui-icon iconfont icon-tongzhi"></span>
						<span class="mui-tab-label">通知</span>
					</a>
					<a class="mui-tab-item" data-href="gerenzhongxin.html" id="wode">
						<span class="mui-icon iconfont icon-Personal"></span>
						<span class="mui-tab-label">我的</span>
					</a>
				</nav>
			</footer>
		</div>
		<script src="../js/jquery-1.8.0.min.js"></script>
		<script src="../js/mui.min.js"></script>
		<script src="../js/common.js"></script>
		<script src="../js/session.js"></script>
		<script type="text/javascript" src="../js/head_public.js" ></script>
		<script type="text/javascript" src="../css/calendar/calendar.js" charset="utf-8"></script>
		<script>
			// $("footer").load("footer1.html")
			mui(".mui-content").on("tap","a[data-href]",function(){
				location.href=$(this).attr("data-href")
//				mui.openWindow({url:)
		    })			
		</script>
		<script type="text/javascript">
			mui.init()
				//获取当前日期
		    var nowdate = new Date();
		    var year = nowdate.getFullYear();
		    var month = nowdate.getMonth()+1;
		    var day = nowdate.getDate();
		    var nowtime = year+"-"+month+"-"+day;
		    var yuangongid="";
			function writeDay(n) //据条件写日期的下拉框
		   {
			   var e = document.reg_testdate.DD; optionsClear(e);
			   for (var i=1; i<(n+1); i++)
			        e.options.add(new Option( i +'日', i));
		   }
		   function IsPinYear(year)//判断是否闰平年
		   {     return(0 == year%4 && (year%100 !=0 || year%400 == 0));}
		   function optionsClear(e)
		   {
		        e.options.length = 1;
		   }
			$('.item-buydate').mdater({maxDate: new Date,minDate: new Date(1900, 0, 1)});
			
		</script>
		<script>
			   
			    var userid=getCookie("userid");
				var work=getCookie("work");
				$(".mui-content").on("tap","#gongzuo",function(){
	         		if(work=="1"){
	         			location.href="guanliindex.html"
//	         			mui.openWindow({url:"guanliindex.html"})
	         		}else if(work=="2"){
	         			location.href="index.html"
//	         			mui.openWindow({url:"index.html"})
	         		}else{
	         			location.href="../public/index.html"
//	         			mui.openWindow({url:"../public/index.html"})
	         		}
					
				})
				if(userid==null||userid==""){
					alert("您还没有登录，请登录")
					mui.openWindow({url:"login.html"})
				}else{
				 if(work!="1"){
						alert("您不是管理员,您没有权限")
						mui.openWindow({url:"../public/index.html"})
					}
					  if(work=="1"){
	                 	$("#gongzuo").attr("data-href","guanliindex.html")
	                 }
					 $.post(net+"/public/index.php?s=api/elevator/adv/member_id/",{"member_id":userid},function(res){
					 	if (res.code=="200") {
					 		if (res.result!=null&&res.result.length!=0) {
					 			var str="";
					 			$.each(res.result,function(index,val){
					 				str+="<div class='swiper-slide'><img src='"+net+"public/uploads/home/adv/"+this.adv_code+"'></div>"
					 			})
					 			$("#banner").append(str)
					 			var mySwiper1 = new Swiper('.banner',{
									pagination: '.swiper-pagination',
									paginationClickable: true,
									slidesPerView: 1,
								    speed:500,
								    autoplay: 3000,
								    loop:true
								});
					 		}
					 	}
					 })
				 }
			
		</script>
	</body>

</html>